#pragma once

#include "LevelElement.h"
#include "PhysX.h"


class Tornado : public LevelElement
{
public:

	Tornado(PhysX* physics, NxVec3 position);
	virtual ~Tornado(void);
	virtual void Tick(const InputState&  dTime);
	virtual void Draw(const RenderContext* context, ID3D10ShaderResourceView* shadowdepthmap = 0) ;
	virtual void Initialize(ContentManager *pContentManager);

	virtual void Setup();
protected:

	void CreateTornadoForceField(const NxVec3& pos, NxActor* actor, NxScene* scene);
	void MoveForceField();
	void Cleanup();
	void Init();

	NxVec3 m_Position;
	PhysX* m_pPhysX;
	NxForceField* m_ForceField;
	NxActor* m_ForceFieldActor;

	NxMat34 m_forceFieldTransform;
	NxActor* m_kinematicActor;
	NxForceFieldShape* m_excludeShape;
	NxForceFieldShapeGroup* m_excludeGroup;

	bool m_forceFieldMoved;
	bool m_switchExcludeShape;
	bool m_excludeGroupEnabled;


private:
	Tornado(const Tornado& TornadoRef);									
	Tornado& operator=(const Tornado& TornadoRef);
};
